import { services } from '@/config'

export const tableOption = {
  column: [
    {
      type: 'input',
      label: '主键',
      prop: 'id',
      span: 12,
      display: false,
      hide: true
    },
    {
      type: 'input',
      label: '创建人ID',
      prop: 'createId',
      span: 12,
      display: false,
      hide: true
    },
    {
      type: 'input',
      label: '创建人姓名',
      prop: 'createBy',
      span: 12,
      display: false,
      hide: true
    },
    {
      type: 'input',
      label: '创建时间',
      prop: 'createTime',
      span: 12,
      display: false,
      hide: true
    },
    {
      type: 'input',
      label: '创建人所属OU的ID',
      prop: 'deptId',
      span: 12,
      display: false,
      hide: true
    },
    {
      type: 'input',
      label: '创建人所属OU的全称',
      prop: 'deptFullname',
      span: 12,
      display: false,
      hide: true
    },
    {
      type: 'input',
      label: '最后修改人信息',
      prop: 'updateBy',
      span: 12,
      display: false,
      hide: true
    },
    {
      type: 'input',
      label: '最后修改时间',
      prop: 'updateTime',
      span: 12,
      display: false,
      hide: true
    },
    {
      type: 'input',
      label: '租户ID',
      prop: 'tenantId',
      span: 12,
      display: false,
      hide: true
    },
    {
      type: 'input',
      label: '数据删除标记',
      prop: 'delFlag',
      span: 12,
      display: false,
      hide: true
    },
    {
      type: 'select',
      label: '使用状况', // {在用、出租出借、闲置、待处置（待报废、销毁）、已处置}
      prop: 'status',
      dicUrl: `${services.adminService}dict/type/edifice_usage_status`,
      dicMethod: 'get',
      props: { label: 'label', value: 'value' },
      span: 12,
      rules: [{ required: true, message: '请选择使用状况' }]
    },
    {
      type: 'tree',
      label: '所属区域',
      prop: 'regionalId',
      span: 12,
      display: true,
      dicUrl: `${services.spaceService}fyroomregional/tree`,
      dicMethod: 'get',
      props: { label: 'name', value: 'id' },
      hide: false,
      required: true,
      rules: [
        {
          required: true,
          message: '所属区域名称必须填写'
        }
      ]
    },
    {
      type: 'input',
      label: '区域名称',
      prop: 'regionalMc',
      span: 12,
      display: false,
      hide: true,
      search: true,
      width: 120,
      searchLabelWidth: 90
    },
    {
      type: 'input',
      label: '楼栋名称',
      prop: 'name',
      width: 140,
      span: 12,
      rules: [
        {
          required: true,
          message: '楼栋名称必须填写'
        }
      ],
      search: true,
      searchLabelWidth: 100,
      required: true
    },
    {
      type: 'number',
      label: '排序号',
      prop: 'ordernumber',
      addDisplay: false,
      span: 12,
      rules: []
    },
    {
      type: 'input',
      label: '资产编码',
      prop: 'assetNumber',
      span: 12
    },
    {
      type: 'input',
      label: '区域全编码',
      prop: 'regionalFullcode',
      span: 12,
      rules: [],
      display: false,
      hide: true
    },
    {
      type: 'input',
      label: '楼栋编号',
      prop: 'code',
      search: true,
      addDisplay: false,
      editDisabled: false,
      searchLabelWidth: 85,
      width: 140,
      span: 12,
      required: false
    },
    {
      type: 'input',
      label: '楼栋座落',
      prop: 'location',
      width: 160,
      span: 12,
      append: '门牌号',
      rules: []
    },
    {
      type: 'input',
      label: '取得方式',
      prop: 'acquireWay',
      span: 12
    },
    {
      type: 'input',
      label: '使用年限',
      prop: 'usefulLife',
      span: 12
    },
    {
      type: 'input',
      label: '实际用途',
      prop: 'practicalUse',
      span: 12,
      search: true,
      searchLabelWidth: 85
    },
    {
      type: 'input',
      label: '批准用途',
      prop: 'permittedUse',
      span: 12
    },
    {
      type: 'input',
      label: '权属证号',
      prop: 'ownershipNumber',
      span: 12
    },
    {
      type: 'input',
      label: '权属证明',
      prop: 'ownershipProve',
      span: 12
    },
    {
      type: 'input',
      label: '权属性质',
      prop: 'ownershipType',
      span: 12
    },
    {
      type: 'date',
      label: '取得日期',
      prop: 'builddate',
      span: 12,
      display: true,
      width: 105,
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd'
    },
    {
      type: 'date',
      label: '发证时间',
      prop: 'issuingDate',
      span: 12,
      display: true,
      width: 105,
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd'
    },
    {
      type: 'input',
      label: '资金来源',
      prop: 'sourcesFunds',
      span: 12
    },
    {
      type: 'input',
      label: '计量单位',
      prop: 'measureUnit',
      span: 12
    },
    {
      type: 'date',
      label: '竣工日期',
      prop: 'completionDate',
      span: 12,
      display: true,
      width: 105,
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd'
    },
    {
      type: 'select',
      label: '建筑结构',
      prop: 'buildingStructure',
      dicUrl: `${services.adminService}dict/type/edifice_building_structure`,
      dicMethod: 'get',
      props: { label: 'label', value: 'value' },
      span: 12,
      dicData: []
    },
    {
      type: 'select',
      label: '抗震级别',
      prop: 'seismicGrade',
      dicUrl: `${services.adminService}dict/type/edifice_earthquake_resistance_level`,
      dicMethod: 'get',
      props: { label: 'label', value: 'value' },
      span: 12,
      dicData: []
    },
    {
      type: 'input',
      label: '地上层数',
      prop: 'upFloor',
      span: 12,
      append: '层'
    },
    {
      type: 'input',
      label: '地下层数',
      prop: 'downFloor',
      span: 12,
      append: '层'
    },
    {
      type: 'input',
      label: '地上面积',
      prop: 'upArea',
      span: 12,
      append: '平米'
    },
    {
      type: 'input',
      label: '地下面积',
      prop: 'downArea',
      span: 12,
      append: '平米'
    },
    {
      type: 'input',
      label: '总层数',
      prop: 'floorcount',
      span: 12,
      append: '层'
    },
    {
      type: 'input',
      label: '占地面积',
      prop: 'coveredArea',
      span: 12,
      append: '平米'
    },
    {
      type: 'input',
      label: '建筑面积',
      prop: 'floorage',
      span: 12,
      append: '平米'
    },
    {
      type: 'select',
      label: '资产来源',
      prop: 'sourceAssets',
      dicUrl: `${services.adminService}dict/type/edifice_scurce_assets`,
      dicMethod: 'get',
      props: { label: 'label', value: 'value' },
      span: 12,
      dicData: []
    },
    {
      type: 'date',
      label: '投入使用日期',
      prop: 'useDate',
      width: 120,
      span: 12,
      display: true,
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd'
    },
    {
      type: 'input',
      label: '数据权限编码，从区域开始一直按着全编码按照表之间的依赖一直延续下去',
      prop: 'dataCode',
      span: 12,
      display: false,
      hide: true
    },
    {
      type: 'input',
      label: '经度',
      prop: 'x',
      span: 12
    },
    {
      type: 'input',
      label: '纬度',
      prop: 'y',
      span: 12
    },
    {
      type: 'textarea',
      label: '备注',
      prop: 'remarks',
      width: 200,
      span: 24,
      display: true
    },
    {
      label: '附件信息',
      prop: 'uploadPage',
      type: 'input',
      formslot: true,
      slot: true,
      span: 24,
      hide: true
    }
  ],
  labelPosition: 'left',
  labelSuffix: '：',
  labelWidth: 120,
  gutter: 0,
  menuBtn: true,
  submitBtn: true,
  submitText: '提交',
  emptyBtn: true,
  emptyText: '清空',
  menuPosition: 'center',
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  searchMenuSpan: 6,
  viewBtn: true
}
